﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <link href="css/radar.css" rel="stylesheet" type="text/css" />
</head>
<body style="border-style: none" scroll="no" topmargin="0" leftmargin="0" onselectstart="return false">
    <div class="radar_2" style="position: absolute;">
    </div>
    <div class="radar_1">
        <div class="radar_text">
            <span class="radar_text_y dropshadow"><span id="tqjs" style="display: none;">多云多变</span>
                <span id="tqjswz">震荡整理，盘整趋势</span> </span><span class="radar_text_w dropshadow"><span
                    id="dqcl">耐心等待</span> <span id="zqcl" style="display: none;">谨慎小心，控制仓位</span>
            </span><span class="radar_text_c dropshadow"><span id="jycw"><span style="display: none;">
                仪器仪表</span><span style="display: none;">电子设备</span><span style="display: inline;">传媒</span></span>
                <br />
            </span>
        </div>
        <img src="radar/duoyun.gif" style="padding-top: 40px; padding-left: 85px;" width="125"
            height="76" id="imgyun" />
    </div>
    <input type="button" value="Test" onclick="ChangeData('1','15.000','涨势强劲，市场做多热情高涨','积极做多','石油石化|证券期货|电子设备|');"
        style="display: none;" />
    <input type="button" value="Test" onclick="GetData();" style="display: none;" />
    <script type="text/javascript">
        document.oncontextmenu = function (e) { return false; }
        function ChangeWeather(color) {
            if (color == 'red') {
                $(".radar_1").removeClass().addClass("radar_1 radar_red");
            }
            else if (color == "blue") {
                $(".radar_1").removeClass().addClass("radar_1 radar_blue");
            }
            else {
                $(".radar_1").removeClass().addClass("radar_1 radar_green");
            }
        }
        function ChangeData(id, posis, content, short_strategy, long_strategy, bkqr, fontsize) {
            if (bkqr == null) {
                bkqr = long_strategy;
            }
            if (fontsize == null) {
                fontsize = 14;
            }
            var posi = parseInt(posis);
            if (posi < 30) {
                ChangeWeather("blue");
            }
            else if (posi > 65) {
                ChangeWeather("red");
            }
            else {
                ChangeWeather("green");
            }
            var imgurl = ""; //"http://brand.emoney.cn/ePweb/";
            switch (id) {
                case "1":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("艳阳高照");
                    break;
                case "2":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("阳光普照");
                    break;
                case "3":
                    imgurl += "radar/zhongyu.gif";
                    $("#tqjs").html("中雨");
                    break;
                case "4":
                    imgurl += "radar/leizhenyu.gif";
                    $("#tqjs").html("雷阵雨");
                    break;
                case "5":
                    imgurl += "radar/qingzhuanduoyun.gif";
                    $("#tqjs").html("多云转晴");
                    break;
                case "6":
                    imgurl += "radar/duoyun.gif";
                    $("#tqjs").html("多云");
                    break;
                case "7":
                    imgurl += "radar/duoyun.gif";
                    $("#tqjs").html("多云");
                    break;
                case "8":
                    imgurl += "radar/xiaoyu.gif";
                    $("#tqjs").html("小雨");
                    break;
                case "9":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("冬日暖阳");
                    break;
                case "10":
                    imgurl += "radar/duoyun.gif";
                    $("#tqjs").html("多云");
                    break;
                case "11":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("冬日暖阳");
                    break;
                case "12":
                    imgurl += "radar/xiaoxue.gif";
                    $("#tqjs").html("小雪");
                    break;
                case "13":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("冬日暖阳");
                    break;
                case "14":
                    imgurl += "radar/qingzhuanduoyun.gif";
                    $("#tqjs").html("晴转多云");
                    break;
                case "15":
                    imgurl += "radar/dayu.gif";
                    $("#tqjs").html("阴雨绵绵");
                    break;
                case "16":
                    imgurl += "radar/daxue.gif";
                    $("#tqjs").html("漫天飞雪");
                    break;
                case "17":
                    imgurl += "radar/leizhenyu.gif";
                    $("#tqjs").html("雷阵雨");
                    break;
                case "18":
                    imgurl += "radar/dayu.gif";
                    $("#tqjs").html("倾盆大雨");
                    break;
            }
            $("#imgyun").attr("src", imgurl);
            if (bkqr != "") {
                GetHtml(bkqr);
            }
            $("#tqjswz").html(content);
            $("#dqcl").html(short_strategy);
            $("#zqcl").html(long_strategy);
            $(".radar_text").css("font-size", fontsize + "px");
        }

        function GetHtml(bkqr) {
            var list = bkqr.split('|');
            var htmlStr = "";
            for (var i = 0; i < list.length; i++) {
                htmlStr += "<div style='display:none;'>" + list[i] + "</div>";
            }
            if (list.length > 0) {
                $("#jycw").html(htmlStr);
            }
            else {
                $("#jycw").html("暂无数据");
            }
            ScrollBKQR(0, list.length - 1);
        }

        function ScrollBKQR(count, list) {
            var indexs = parseInt(count);
            if (indexs >= list) {
                indexs = 0;
            }
            $("#jycw").find("div").hide();
            $("#jycw").find("div").eq(indexs).show();
            indexs++;
            setTimeout("ScrollBKQR(" + indexs + "," + list + ")", 1000);
        }

        function ChangData(data) {
            var imgurl = ""; //"http://brand.emoney.cn/ePweb/";
            var id = data["weather"];
            switch (id) {
                case "1":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("艳阳高照");
                    $("#tqjswz").html("涨势强劲，市场做多热情高涨");
                    $("#dqcl").html("积极做多");
                    $("#zqcl").html("重仓持有待涨");
                    break;
                case "2":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("阳光普照");
                    $("#tqjswz").html("个股普涨，市场延续强势上升");
                    $("#dqcl").html("积极做多");
                    $("#zqcl").html("重仓持有待涨");
                    break;
                case "3":
                    imgurl += "radar/zhongyu.gif";
                    $("#tqjs").html("中雨");
                    $("#tqjswz").html("涨势受阻，市场回落休整");
                    $("#dqcl").html("注意风险");
                    $("#zqcl").html("趋势未改 持仓观望");
                    break;
                case "4":
                    imgurl += "radar/leizhenyu.gif";
                    $("#tqjs").html("雷阵雨");
                    $("#tqjswz").html("震荡加剧，多空分歧较大");
                    $("#dqcl").html("注意风险");
                    $("#zqcl").html("趋势未改 持仓观望");
                    break;
                case "5":
                    imgurl += "radar/qingzhuanduoyun.gif";
                    $("#tqjs").html("多云转晴");
                    $("#tqjswz").html("震荡上扬，继续保持做多热情");
                    $("#dqcl").html("适当做多");
                    $("#zqcl").html("趋势未改 积极持仓");
                    break;
                case "6":
                    imgurl += "radar/duoyun.gif";
                    $("#tqjs").html("多云");
                    $("#tqjswz").html("震荡整理，盘整蓄势");
                    $("#dqcl").html("适当做多");
                    $("#zqcl").html("趋势未改 积极持仓");
                    break;
                case "7":
                    imgurl += "radar/duoyun.gif";
                    $("#tqjs").html("多云");
                    $("#tqjswz").html("震荡整理，盘整蓄势");
                    $("#dqcl").html("适当控制仓位");
                    $("#zqcl").html("趋势未改 积极持仓");
                    break;
                case "8":
                    imgurl += "radar/xiaoyu.gif";
                    $("#tqjs").html("小雨");
                    $("#tqjswz").html("震荡整理，走势不强");
                    $("#dqcl").html("适当控制仓位");
                    $("#zqcl").html("趋势未改 积极持仓");
                    break;
                case "9":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("冬日暖阳");
                    $("#tqjswz").html("反弹拉升，市场趋于活跃");
                    $("#dqcl").html("谨慎做多");
                    $("#zqcl").html("谨慎小心，控制仓位");
                    break;
                case "10":
                    imgurl += "radar/duoyun.gif";
                    $("#tqjs").html("多云");
                    $("#tqjswz").html("震荡整理，盘整蓄势");
                    $("#dqcl").html("谨慎做多");
                    $("#zqcl").html("谨慎小心，控制仓位");
                    break;
                case "11":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("冬日暖阳");
                    $("#tqjswz").html("反弹拉升，市场趋于活跃");
                    $("#dqcl").html("注意风险");
                    $("#zqcl").html("谨慎小心，控制仓位");
                    break;
                case "12":
                    imgurl += "radar/xiaoxue.gif";
                    $("#tqjs").html("小雪");
                    $("#tqjswz").html("震荡调整，走势趋弱");
                    $("#dqcl").html("注意风险");
                    $("#zqcl").html("谨慎小心，控制仓位");
                    break;
                case "13":
                    imgurl += "radar/qing.gif";
                    $("#tqjs").html("冬日暖阳");
                    break;
                case "14":
                    imgurl += "radar/qingzhuanduoyun.gif";
                    $("#tqjs").html("晴转多云");
                    break;
                case "15":
                    imgurl += "radar/dayu.gif";
                    $("#tqjs").html("阴雨绵绵");
                    break;
                case "16":
                    imgurl += "radar/daxue.gif";
                    $("#tqjs").html("漫天飞雪");
                    break;
                case "17":
                    imgurl += "radar/leizhenyu.gif";
                    $("#tqjs").html("雷阵雨");
                    break;
                case "18":
                    imgurl += "radar/dayu.gif";
                    $("#tqjs").html("倾盆大雨");
                    break;
                default:
                    $("#tqjs").html("艳阳高照");
                    $("#tqjswz").html("涨势强劲，市场做多热情高涨");
                    $("#dqcl").html("积极做多");
                    $("#zqcl").html("重仓持有待涨");
                    break;
            }
            $("#imgyun").attr("src", imgurl);
            GetHtml(data["long_strategy"]);
            $("#tqjswz").html(data["content"]);
            $("#dqcl").html(data["short_strategy"]);
            $("#zqcl").html(data["long_strategy"]);
            $(".radar_text").css("font-size", "14px");
        }

        function GetData() {
            $.ajax({
                type: "POST",
                url: "DataInfo.ashx",
                dataType: "json",
                data: { action: "GetWeatherData" },
                success: function (result) {
                    if (result != null && result != "") {
                        var posi = parseInt(result["posi"]);
                        if (posi < 30) {
                            ChangeWeather("blue");
                        }
                        else if (posi > 65) {
                            ChangeWeather("red");
                        }
                        else {
                            ChangeWeather("green");
                        }
                        ChangData(result);
                    }
                }
            });
        }

        $(document).ready(function () {
            GetData();
        });
    </script>
</body>
</html>
